<template>
  <div>
    <ylheader :leftsvg='true' :title="headtitle" ></ylheader>
    <div class="phone v-c" v-for="(item,index) in list" :key="index">
      <div class="title">{{item.title}}:</div>
      <div class="detail">{{item.content}}</div>
    </div>
      <div class="add-h v-c " v-show="this.$route.query.tag==1">
        <span class="yl-table-add add-icon"></span>
        <span class="addresscontent">提货地址:&nbsp{{typeValue}}</span>
    </div>
  </div>
</template>
<script>
import api from "src/api/index";
import ylheader from "src/components/yl-header.vue";
export default {
name:"showaddress",
  data(){
      return{
        headtitle:"",
        typeValue:"",
        tag:"",
        data:"",
        list:[{title:'收货人',content:""},{title:'手机号',content:""},{title:'详细地址',content:""}],
      }
  },
  components:{
      api,
      ylheader,
  },
  mounted(){
   this.init();
  },
  methods:{
   init(){
     if(typeof this.$route.query.typeValue!="undefined"){
       this.typeValue=this.$route.query.typeValue;
     }
     this.list[0].content=this.$route.query.name;
     this.list[1].content=this.$route.query.phone;
     if(this.$route.query.tag==1){
       this.headtitle = "提货信息";
       this.list[0].title="提货人";
      this.list.splice(this.list.length-1,1);
     }else if(this.$route.query.tag==0){
       this.headtitle = "收货信息";
       this.list[0].title="收货人";
       this.list[2].title="详细地址";
       this.list[2].content=this.$route.query.address;
     }
   }
  }
}
</script>
<style lang="less" scoped>
.add-h{
height: 0.96rem;
padding: 0 0.3rem;
background: #ffffff;
}
.add-icon{
  padding: 0.04rem 0.1rem 0 0;
  color: #fb725f;
  font-size: 0.34rem;
}
.addresscontent{
  font-size: 0.26rem;
  color: #777;
}
.phone{
  border-bottom: 1px solid #e6e6e6;
  height: 0.9rem;
  background: #ffffff;
  padding: 0 0.3rem;
  .title{
    color: #3a3a3a;
    font-size: 0.3rem;
    width: 1.45rem;
    font-weight: 600;
    margin-right: 0.2rem;
  }
  .detail{
    color: #666666;
    font-size: 0.24rem;
    flex: 1;
  }
}

</style>


